package test02;

import java.util.Arrays;
import java.util.Scanner;

public class demo03 {
    public static void main(String[] args) {
        int arr[]={3,60,53,23,5};
        System.out.println("数组为:"+Arrays.toString(arr));
        System.out.print("请输入要查询的数字:");
        Scanner sc=new Scanner(System.in);
        int num=sc.nextInt();
        for(int i=0;i<arr.length;i++){
            if(arr[i]==num){
                System.out.println("此数组中有"+num+"这个数字");
                break;
            }
            if(i==arr.length-1){
                System.out.println("数组中没有这个数字");
            }
        }
    }
}
